{include file="lib/front_header.html"}
<div class="content">
	<div class="clearfix pb30">
  	</div>
      	{foreach $data as $val}
	  	<div class="{get_bg_color($val.hotcolor_num)}">
	  		<h3>{nl2br($val.content)}</h3>
	  		<p>
	  			<cite>
	  				#{$val.id} － On {date('Y/m/d', $val.add_time)} － <a href="{$val.id}" class="dingzui">回嘴 (<span>{$val.comment_num}</span>)</a> － <a href="{$val.id}" class="qinzui">特危险 (<span>{$val.kiss_num}</span>)</a> － <a href="{$val.id}" class="zhangzui">一般般 (<span>{$val.palm_num}</span>)</a> {$info['id']}
	  			</cite>
	  			<em>
	  				<a href="http://v.t.sina.com.cn/share/share.php?title={urlencode($val.content)}&site={$smarty.const.SITE_URL}" target="_blank" class="share_btn share_weibo fr">新浪微薄</a>
	  				<a href="http://www.kaixin001.com/repaste/share.php?rcontent={urlencode($val.content)}&site={$smarty.const.SITE_URL}" target="_blank" class="share_btn share_kaixin fr">开心</a>
	  				<a href="http://share.renren.com/share/buttonshare.do?link={$smarty.const.SITE_URL}&title={urlencode($val.content)}&site={$smarty.const.SITE_URL}" target="_blank" class="share_btn share_renren fr">人人</a>
	  				<a href="http://www.douban.com/recommend/?url={$smarty.const.SITE_URL}&title={urlencode($val.content)}&site={$smarty.const.SITE_URL}" target="_blank" class="share_btn share_douban fr">豆瓣</a>
	  				<a href="http://v.t.qq.com/share/share.php?url={$smarty.const.SITE_URL}&appkey=2c66cc0d6df84e718139f3341cc5408f&source=%E5%88%86%E4%BA%AB%E5%AE%B6&site={$smarty.const.SITE_URL}&title={urlencode($val.content)}" target="_blank" class="share_btn share_tencent fr">腾讯</a>	  		
	  			</em>
	  		</p>
	  	</div>
			<div class="content_cmts clearfix" style="display:none;"><p></p></div>
	  	{/foreach}
	{include file="lib/front_pager.html"}
	{include file="lib/front_footer.html"}
	</div>
	<script type="text/javascript" charset="utf-8">
		$('.comment_pager a').live('click',function(){
			var url = $(this).attr("href");
			$(this).parents('.content_cmts').load(url);
			return false;
		});	
		$("#post_add").click(function(){
            $("#post_1").submit();
            return false;   
        });
		$(".dingzui").click(function(){
			$(".content_cmts").hide();
			$(".content_cmts").html('');
			load_comment.call(this);
			return false;
		});

		function load_comment() {
			var post_id = $(this).attr("href");
			$(this).parents('.pop_ups').next(".content_cmts").load('comment.html?post_id='+post_id, function(){
				$(this).show();
			});
		}
		
		
		$(".qinzui").click(function(){
			var post_id = $(this).attr("href");
			var qin = $(this).children().html();
			var qin2 = $(this).children();
			$.get("favor/create.html?type=1&post_id="+post_id, function(data){

				if(data=='嚯~~~'){
					qin2.html(qin-1+2);
				}

				alert(data);
			});
			return false;
		});
		
		$(".zhangzui").click(function(){
			var post_id = $(this).attr("href");
			var zz = $(this).children().html();
			var zz2 = $(this).children();
			$.get("favor/create.html?type=2&post_id="+post_id, function(data){
					
				if(data=='你能更危险么?'){
					zz2.html(zz-1+2);
				}
				alert(data);
				
			});
			return false;
		});
		
		$(".shouchang").click(function(){
			var post_id = $(this).attr("href");
			$.get("favor/create.html?type=3&post_id="+post_id, function(data){
				alert(data);
			});
			return false;
		});
		
	</script>
